import React from 'react';
import cn from 'classnames';
import { Icon } from '@/pages/Recruitment/components';
import styles from './index.less';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const InterviewDetail = ({ dataSource = [], keyStyle, valueStyle, flexStyle, popTip = true, ...rest }) => (
    <div className={cn(styles.top)} style={{ ...flexStyle }}>
        {dataSource.map(item => (
            <div className={styles.container} key={item.key} {...rest}>
                <div className={styles.job}>
                    {item.showIcon && (
                        <Icon
                            type={item.iconType}
                            theme="filled"
                            style={{ fontSize: 22, marginRight: '10px', color: 'rgba(0,0,0,0.15)' }}
                        />
                    )}
                    {item.showImg && (
                        <img src={item.imgSrc} alt="" style={{ width: '20px', height: '20px', marginRight: '10px' }} />
                    )}
                    <div style={{ ...keyStyle }}> {item.render || item.key}</div>
                </div>
                <div
                    className={cn(popTip ? styles.popTip : '', styles.jobDesc)}
                    style={{
                        marginLeft: item.showIcon || item.showImg ? 30 : 0,
                        lineHeight: 'auto',
                        ...valueStyle,
                        height: 'auto'
                    }}
                >
                    {item.value}
                </div>
            </div>
        ))}
    </div>
);
// eslint-disable-next-line @typescript-eslint/no-unused-vars

export default InterviewDetail;
